{include file=$header_start}
{strip}
<script src="{$siteroot}/includes/js/admin/leads.js" type="text/javascript"></script>
<script src="{$siteroot}/includes/js/admin/ajax.js" type="text/javascript" ></script>
{/strip}

{literal}
<script type="text/javascript">

function showsuburb(stateid)
{
	if(stateid!='')
	{
		ajax.sendrequest("GET",SITEROOT + "/admin/manageleads/show_suburb.php",{stateid:stateid},"","issuburbDiv");
	}
	else
	{
		document.getElementById('suburbid').value='';
	}
}

function showpostalcode(suburbid)
{
	if(suburbid!='')
	{
		ajax.sendrequest("GET",SITEROOT + "/admin/manageleads/show_suburb.php",{suburbid:suburbid},"","isPostalDiv");
	}
	else
		document.getElementById('postalcode').value='';
}


</script>
{/literal}
{include file=$header_end}
 <div class="contain">
      {include file=$left_menu}
      <div class="right_contain">
         <div class="heading_box">Add Lead Price</div>
         <div class="whitebox">
         <!--Message Div Start-->
         {if $msg}
         <div class="masg_div">
           {$msg}
         </div>
         {/if}
         <!--Message Div End-->
         <form name="frmAddLeads" id="frmAddLeads" action="" method="post">
          <input type="hidden" id="page" name="page" value="{$page}" />
         <div style="min-height:250px;">
          <!--Form Contain start-->
           <div class="form_fieldbox">
             
			  <dl>
              <dt>Membership Plan:<span class="error">*</span></dt>
              <dd><select name="plan_id" id="plan_id" class="select">
              <option value="">--Select plan--</option>
              {section name=i loop=$planArray}
              <option value="{$planArray[i].plan_id}" {if $planArray[i].plan_id eq $smarty.post.plan_id} selected="selected" {/if}>{$planArray[i].name}</option>
              {/section}
              </select></dd>
              <div class="clear"></div>
             </dl>
             
             <dl>
              <dt>Region:<span class="error">*</span></dt>
              <dd><select name="regionid" id="regionid" class="select" onchange="showsuburb(this.value);">
              <option value="">--Select Region--</option>
              {section name=i loop=$stateArray}
              <option value="{$stateArray[i].state_id}" {if $stateArray[i].state_id eq $smarty.post.regionid} selected="selected" {/if}>{$stateArray[i].state_name}</option>
              {/section}
              </select></dd>
              <div class="clear"></div>
             </dl>
             
            <!-- <dl>
              <dt>Suburb Area:<span class="error">*</span></dt>
              <dd>
              <div id="issuburbDiv">
              <select name="suburbid" id="suburbid" class="select">
                  <option value="">--Select Suburb--</option>
                  {section name=i loop=$suburbArray}
                  <option value="{$suburbArray[i].id}" {if $suburbArray[i].id eq $smarty.post.suburbid} selected="selected" {/if}>{$suburbArray[i].suburb}</option>
                  {/section}
              </select>
              </div>
              </dd>
              <div class="clear"></div>
             </dl>-->
             
			<!-- <dl>
              <dt>Postal code:<span class="error">*</span></dt>
              <dd>
              		<div id="isPostalDiv">
	              		<input type="text" class="input" name="postalcode" id="postalcode" value="{$smarty.post.postalcode}" readonly="readonly" />
                    </div>
              </dd>
              <div class="clear"></div>
             </dl>-->
            
             <dl>
              <dt>Job Type:<span class="error">*</span></dt>
              <dd><select name="jobtypeid" id="jobtypeid" class="select">
              <option value="">--Select Job Type--</option>
              {section name=i loop=$jobtypeArray}
              <option value="{$jobtypeArray[i].id}" {if $jobtypeArray[i].id eq $smarty.post.jobtypeid} selected="selected" {/if}>{$jobtypeArray[i].trade_category}</option>
              {/section}
              </select></dd>
              <div class="clear"></div>
             </dl>
             
              <dl>
              <dt>Budget:<span class="error">*</span></dt>
              <dd>
              <select name="budget" id="budget" class="select">
	              <option value="">--Select Budget--</option> 
                  {section name=i loop=$budgetArray}
                     <option value="{$budgetArray[i].budget_id}" {if $budgetArray[i].budget_id eq $smarty.post.budget} selected="selected" {/if}>Under ${$budgetArray[i].budget_name}</option>
                  {/section}                              
                 <!-- <option value="10-50">$10 to $50</option> 
                  <option value="50-100">$50 to $100</option> 
                  <option value="100-150">$100 to $150</option> 
                  <option value="150-200">$150 to $200</option> 
                  <option value="200-250">$200 to $250</option>-->              
              </select>
              </dd>
              <div class="clear"></div>
             </dl>
             
              
             <dl>
              <dt>Price:<span class="error">*</span></dt>
              <dd><input type="text" class="input" name="price" id="price" value="{$smarty.post.price}" /></dd>
              <div class="clear"></div>
             </dl>
             
           
            </div>
            
            <!--Form Contain end--> 
          
           <!--Button here start-->
           <div>
            <span><input type="submit" class="admin_btn" value="Submit" name="addleads_btn" id="addleads_btn" /></span>
            <span><input type="button" class="admin_btn" value="Cancel" onclick="window.location='{$siteroot}/admin/home.php?q=leads&page={$smarty.get.page}';"/></span>
           </div>
            <!--Button here end-->
  
         </div>
         </form>
         
         </div>
        </div>
      
      
      <!--right_contain end-->
      <div class="clear"></div>
    </div>
    
{include file=$footer}